package Demo07;

public class Student {
        // 私有属性`name`、`age`和`grade`;
      private  int nama;
      private   double age;
      private  String graade;
      //无参构造器
      public Student() {
}
      //有参构造器
    public Student( int nama,double age,String graade){
          this.nama=nama;
          this.age=age;
          this.graade=graade;
    }
    //gette方法

    public int nama() {
        return nama;
    }

    public double age() {
        return age;
    }

    public String graade() {
        return graade;
    }
//setter方法
    public void setNama(int nama) {
        this.nama = nama;
    }

    public void setAge(double age) {
        this.age = age;
    }

    public void setGraade(String graade) {
        this.graade = graade;
    }
    public String toString() {
        return "Student{" +
                "nama=" + nama +
                ", age=" + age +
                ", graade='" + graade + '\'' +
                '}';
    }
}
